/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tiposgenericos;
import java.util.Set;
import java.util.TreeSet;

/**
 *
 * @author UNSAAC73
 */
public class PruebaComparable {
    public static void main(String[] args) {
        Set <Persona> lista = new TreeSet<Persona>();
        lista.add(new Persona("Juan", "15"));
        lista.add(new Persona("Alberto", "25"));
        lista.add(new Persona("Ivan", "18"));
        lista.add(new Persona("Angel", "37"));
        lista.add(new Persona("Miguel", "14"));
        
        // Imprimir la lista de personas
        System.out.println(lista);
        
    }
    
}
